<template>
  <div class="mine">
    <div class="box">我的考拉</div>
      <header>
        <div class="headerlogo">
          <i class="iconfont">&#xe60a;</i>
        </div>
        <p class="headerp">手机用户8746</p>
        <button @click="logoutHandler">退出</button>
      </header>
      <main>
        <div class="maindiv">
          <ul>
            <li>
              <i class="iconfont">&#xe620;</i>
              <p>待付款</p>
            </li>
            <li>
              <i class="iconfont">&#xe606;</i>
              <p>代发货</p>
            </li>
            <li>
              <i class="iconfont">&#xe604;</i>
              <p>待收货</p>
            </li>
            <li>
              <i class="iconfont">&#xe600;</i>
              <p>退款退货</p>
            </li>
            <li>
              <i class="iconfont">&#xe614;</i>
              <p>全部订单</p>
            </li>
          </ul>
        </div>
        <div class="maindiv1">
          <ul class="mainul1">
            <li class="mainli1">
              <i class="iconfont">&#xe61c;</i>
              <p>优惠卷</p>
            </li>
            <li class="mainli1">
              <i class="iconfont">&#xe619;</i>
              <p>红包</p>
            </li>
            <li class="mainli1">
              <i class="iconfont">&#xe624;</i>
              <p>考拉豆</p>
            </li>
          </ul>
        </div>
        <div class="maindiv3">
          <ul class="mainul2">
            <li class="mainli2">
              <i class="iconfont">&#xe615;</i>
              <p>收藏</p>
            </li>
            <li class="mainli2">
              <i class="iconfont">&#xe61c;</i>
              <p @click="CollectCoupons">领券中心</p>
            </li>
            <li class="mainli2">
              <i class="iconfont">&#xe618;</i>
              <p>会员中心</p>
            </li>
            <li class="mainli2">
              <i class="iconfont">&#xe621;</i>
              <p>APP下载</p>
            </li>
          </ul>
        </div>
        <div class="maindiv4">
            <div class="div1">
              <h2>考拉承诺 | 正品海购</h2>
              <p>12项保障</p>
            </div>
            <div class="div2">
              <ul>
                <li>
                  <i class="iconfont">&#xe685;</i>
                  <p>考拉自营</p>
                </li>
                <li>
                  <i class="iconfont">&#xe6bf;</i>
                  <p>全球直采</p>
                </li>
                <li>
                  <i class="iconfont">&#xe610;</i>
                  <p>假一赔十</p>
                </li>
                <li>
                  <i class="iconfont">&#xe600;</i>
                  <p>售后无忧</p>
                </li>
              </ul>
              <span>查看详情</span>
            </div>
        </div>
      </main>
  </div>
</template>

<script>
import { mapActions } from 'vuex'
export default {
  name: 'Mine',
  methods: {
    ...mapActions(['logoutAsync']),
    logoutHandler () {
      this.logoutAsync().then(res => {
        this.$router.push('/')
      })
    },
    CollectCoupons () {
      this.$router.push('/CollectCoupons')
    }
  }
}
</script>

<style lang="scss" scoped>
@font-face {
  font-family: 'iconfont';  /* project id 1941138 */
  src: url('//at.alicdn.com/t/font_1941138_fyn7ag7hqyb.eot');
  src: url('//at.alicdn.com/t/font_1941138_fyn7ag7hqyb.eot?#iefix') format('embedded-opentype'),
  url('//at.alicdn.com/t/font_1941138_fyn7ag7hqyb.woff2') format('woff2'),
  url('//at.alicdn.com/t/font_1941138_fyn7ag7hqyb.woff') format('woff'),
  url('//at.alicdn.com/t/font_1941138_fyn7ag7hqyb.ttf') format('truetype'),
  url('//at.alicdn.com/t/font_1941138_fyn7ag7hqyb.svg#iconfont') format('svg');
}
.iconfont{
    font-family:"iconfont" !important;
    font-size:16px;font-style:normal;
    -webkit-font-smoothing: antialiased;
    -webkit-text-stroke-width: 0.2px;
    -moz-osx-font-smoothing: grayscale;}
  .mine{
    // margin-top: 40px;
    width: 100%;
    height: 100%;
    background: #f0f0f0;
    .box{
      width: 100%;
      height: 20px;
      background: #fd424d;
      font-weight: bold;
      color: #fff;
      text-align: center;
      font-size: 22px;
      line-height: 40px;
      margin: 0;
      border-radius:0 ;
    }
    header{
      height: 100px;
      width: 100%;
      background: #fd424d;
      display: flex;
      .headerlogo{
        height: 52px;
        width: 52px;
        background: #ccc;
        border: 1px solid #fff;
        border-radius:50%;
        margin: 25px 0 0 12px;
        i{
          font-size: 30px;
          text-align: center;
          line-height: 52px;
          margin-left: 10px;
        }
      }
      .headerp{
        font-size: 22px;
        color: #fff;
        font-weight:bold;
        margin: 40px 0 0 4px;
      }
      button{
        width: 50px;
        height: 30px;
        font-size: 12px;
        margin-top: 35px;
        margin-left: 80px;
      }
    }
    .maindiv{
      width: 356px;
      height: 93px;
      background: #fff;
      margin: 0 0 0 12px;
      border-radius:4px ;
    }
    .maindiv ul{
      display: flex;
      justify-content: space-around;
    }
    .maindiv ul li{
      display: flex;
      flex-direction: column;
      align-items: center;
      margin-top: 28px;
      .iconfont{
        font-size: 24px;
        margin-bottom: 11px;
        color: #fe4950;
      }
      p{
        font-size: 12px;
        color: #333333;
        line-height: 12px;
      }
    }
    .maindiv1{
      height: 78px;
      width: 356px;
      background: #fff;
      margin: 15px 0 0 12px;
       border-radius:4px ;
      .mainul1{
      display: flex;
      justify-content: space-around;
      .mainli1{
        display: flex;
        flex-direction: column;
        align-items: center;
        margin-top: 18px;
      .iconfont{
        font-size: 24px;
        margin-bottom: 9px;
        color: #fe4950;
          }
        p{
        font-size: 12px;
        color: #333333;
        line-height: 12px;
      }
        }
      }
    }
    .maindiv3{
      height: 91px;
      width: 356px;
      background: #fff;
      margin: 15px 0 0 12px;
      border-radius:4px;
      .mainul2{
      display: flex;
      justify-content: space-around;
      .mainli2{
        display: flex;
        flex-direction: column;
        align-items: center;
        margin-top: 18px;
      .iconfont{
        font-size: 24px;
        margin-bottom: 9px;
        color: #686868;
        width: 30px;
        height: 30px;
        background: #f0f0f2;
        border-radius:50%;
        text-align: center;
        line-height: 30px;
          }
        p{
        font-size: 12px;
        color: #666666;
        line-height: 12px;
      }
        }
      }
    }
    .maindiv4{
      height: 64px;
      width: 356px;
      background: #fff;
      margin: 15px 0 0 12px;
      border-radius:4px;
      .div1{
        display: flex;
        justify-content: space-between;
        padding: 14px 10px 7px 10px;
        h2{
          font-size: 16px;
          font-weight: bold;
          line-height: 16px;
          color: #ff0000;
        }
        p{
          font-size: 10px;
          line-height: 10px;
          color: #b5b5b5;
        }
      }
      .div2{
        display: flex;
        justify-content: space-between;
        padding: 0 10px 0 10px;
        ul{
          display: flex;
          li{
            display: flex;
            p{
              font-size: 10px;
              line-height: 10px;
              color: #a7a7a7;
            }
            .iconfont{
              font-size: 12px;
              margin-bottom: 11px;
              color: #a7a7a7;
            }
          }
        }
        span{
          width: 69px;
          height: 22px;
          background: #ff1e2e;
          border-radius:10px ;
          font-size: 14px;
          line-height: 22px;
          text-align: center;
          color: #fff;
        }
      }
    }
  }
</style>
